table of contents
PAPI_num_events(3) | PAPI | PAPI_num_events(3) |
NAME¶
PAPI_num_events - return the number of events in an event set
SYNOPSIS¶
C Interface
#include <papi.h> int PAPI_num_events(int EventSet);
Fortran Interface
#include fpapi.h PAPIF_num_events(C_INT EventSet, C_INT count)
DESCRIPTION¶
PAPI_num_events() returns the number of preset events contained in an event set. The event set should be created by PAPI_create_eventset(3).
ARGUMENTS¶
EventSet -- an integer handle for a PAPI event set as created by PAPI_create_eventset(3)
*count -- On output the variable contains the number of events in the event set.
RETURN VALUES¶
On success, this function returns the positive number of events in the event set. On error, a non-zero error code is returned.
ERRORS¶
- PAPI_EINVAL
- The event count is zero; only if code is compiled with debug enabled.
- PAPI_ENOEVST
- The EventSet specified does not exist.
EXAMPLES¶
/* Count the events in our EventSet */
printf("%d events found in EventSet.0, PAPI_num_events(EventSet));
BUGS¶
This function has no known bugs.
SEE ALSO¶
September, 2004 | PAPI Programmer's Reference |